<?php
use app\models\Comment;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

$comment = new Comment();
$comment->parent_id = 0;
?>
<!--评论-->
<div id="commentPopover" class="mui-popover">
    <div class="commentBox">
        <?php $form = ActiveForm::begin(['action' => Url::to(['comment/save', 'ref' => $ref])]); ?>
        <?= $form->field($comment, 'parent_id')->hiddenInput()->label(FALSE); ?>
        <?= $form->field($comment, 'content')->textarea(['placeholder' => '请输入内容', 'rows' => '4'])->label(FALSE); ?>
        <?= $form->field($comment, 'own')->hiddenInput(['value' => $own])->label(FALSE); ?>
        <?= $form->field($comment, 'own_id')->hiddenInput(['value' => $own_id])->label(FALSE); ?>

        <div class="mui-text-right">
            <input type="submit" value="发表" class="submit"/>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
</div>